<?php
function PMA_jsFormat($a_string = '', $add_backquotes = true) { if (is_string($a_string)) { $a_string = htmlspecialchars($a_string); $a_string = PMA_escapeJsString($a_string); $a_string = str_replace('#', '\\#', $a_string); } return (($add_backquotes) ? PMA_backquote($a_string) : $a_string); } function PMA_escapeJsString($string) { return preg_replace('@</script@i', '</\' + \'script', strtr($string, array( '\\' => '\\\\', '\'' => '\\\'', "\n" => '\n', "\r" => '\r'))); } ?>
